import axios, {ResponseData} from 'yuxin-base/src/utils/axios'

/**
 * pms获取收支明细列表
 * @param data
 */
export const financeBillDetailList = (data: object): Promise<ResponseData> => {
	return axios.request({
		url: '/admin/finance_bill_detail/list_finance_bill_detail',
		data,
		method: 'POST'
	})
}

/**
 * pms收支明细列表统计信息
 * @param data
 */
export const financeCountInfo = (data: object): Promise<ResponseData> => {
	return axios.request({
		url: '/admin/finance_bill_detail/finance_count_info',
		data,
		method: 'POST'
	})
}

/**
 * pms根据ID获取收支表信息
 * @param id
 */
export const financeBillDetailGetId = (id: string): Promise<ResponseData> => {
	return axios.request({
		url: `/admin/finance_bill_detail/get/${id}`,
		method: 'get'
	})
}

/**
 * pms查询流水列表
 * @param data
 */
export const financeBillFlowList = (data: object): Promise<ResponseData> => {
	return axios.request({
		url: '/basesearch/finance_bill_flow/list_bill_flow',
		data,
		method: 'POST'
	})
}

/**
 * pms账单流水列表统计
 * @param data
 */
export const financeBillFlowCount = (data: object): Promise<ResponseData> => {
	return axios.request({
		url: '/basesearch/finance_bill_flow/bill_flow_count',
		data,
		method: 'POST'
	})
}

/**
 * pms查询流水详情
 * @param id
 */
export const getFinanceBillFlowDetail = (id: string): Promise<ResponseData> => {
	return axios.request({
		url: `/admin/finance_bill_flow/get_bill_flow_detail/${id}`,
		method: 'get'
	})
}

/**
 * pms流水审核
 * @param data
 */
export const financeBillFlowAudit = (data: object): Promise<ResponseData> => {
	return axios.request({
		url: '/admin/finance_bill_flow/audit',
		data,
		method: 'POST'
	})
}

/**
 * 批量流水审核
 * @param data
 */
export const financeBillAuditBatch = (data: object): Promise<ResponseData> => {
	return axios.request({
		url: '/finance/finance_bill_flow/audit_batch',
		data,
		method: 'POST'
	})
}
/**
 * 获取账单核销信息
 * @param data
 */
export const getEnterpriseList = (data: object): Promise<ResponseData> => {
	return axios.request({
		url: '/basesearch/finance_bill/enterprise/list',
		data,
		method: 'POST'
	})
}
